const tagService = require("@/server/tag");
const { successData, sendCode } = require("@/utils/r/result");
const tag = {
  async GetOption(req, res) {
    successData(res, await tagService.GetOption());
  },
  async GetList(req, res) {
    successData(res, await tagService.GetList(req.query));
  },
  async SaveOrUpdate(req, res) {
    sendCode(res, await tagService.SaveOrUpdate(req.body));
  },
  async Delete(req, res) {
    sendCode(res, await tagService.Delete(req.body));
  },
};

module.exports = tag;
